# plugs/version.py
#
#

""" show bot version """

from ommbot.world import add_cmnd, add_example, add_alias, get_config
import sys

def handle_version(bot, ievent):
    """ version .. show bot's and python's version """
    config = get_config()
    if config:
        ievent.reply(config['version'])
    else:
        ievent.reply('config is not enabled')

add_cmnd('version', handle_version, ['USER', 'WEB'])
add_example('version', 'show bot version', 'version')
add_alias('v', 'version')
